package org.sang.common;

import org.sang.beans.User;
import org.springframework.security.core.context.SecurityContextHolder;

public class UserUtils {
    /**
     * 用来返回当前登录用户的信息
     * @return hr
     */
    public static User getCurrentHr() {
        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
